import { post } from '@/utils/request';

export interface ListParams {
  startTime: string;
  endTime: string;
  code: string;
  classifyType: string;
}

export interface TimeParams {
  callTimeStart: string;
  callTimeEnd: string;
  classifyCodes?: string;
  callSummaryCodes?: string;
  dealSummaryCodes?: string;
  groupField: string;
}

export interface CompanyParams {
  startTime: string;
  endTime: string;
  tqStartTime?: string;
  tqEndTime?: string;
  sqStartTime?: string;
  sqEndTime?: string;
  type: string;
  code: string;
  classifyType: string;
}

export interface StatParams {
  startTime: string;
  endTime: string;
  type: string;
  code: string;
  classifyType: string;
}

// 预警规则
export async function getQueryYjResultList(params: { ids: string }) {
  return post('/sjyj/queryYjResultList', params);
}
// 当期警情预警规则
export async function getQueryYjCurResultList(params: { modelId: string }) {
  return post('/sjyj/queryYjCurResultList', params);
}

// 预警规则
export async function getQueryHotWord(params: ListParams) {
  return post('/sjyj/queryHotWord', params);
}

// 预警高发时段分析
export async function getTimeStat(params: TimeParams) {
  return post('/aitype/persona/timeStat', params);
}

// 预警辖区单位分布
export async function getQueryYjXqdwStat(params: CompanyParams) {
  return post('/sjyj/queryYjXqdwStat', params);
}

//警情分析
export async function getQueryThemeBarStat(params: any) {
  return post('/aitype/caseInfo/queryThemeBarStat', params);
}

// 预警手机号报警量统计
export async function getQueryYjPhoneStat(params: StatParams) {
  return post('/sjyj/queryYjPhoneStat', params);
}
export async function queryYjClassStat(params: any) {
  return post('/sjyj/queryYjClassStat', params);
}
export async function queryYjCaseInfoStat(params: any) {
  return post('/sjyj/queryYjCaseInfoStat', params);
}
